package com.voicechat.firstmet.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.bean
 * @ClassName: CommentBean
 * @Description: 评论的bean
 * @Author: ljp
 * @CreateDate: 2018/11/1 13:59
 * @Version: 1.0
 */
public class CommentBean {

    /**
     * code : 200
     * msg : 成功
     * page : {"pageNo":1,"pageSize":10,"count":2,"list":[{"id":"123","isNewRecord":false,"content":"1024程序员节","avatarUrl":"head/64121538037382.jpg","nickName":"😁","gender":2,"birthday":"1998-09-27","fabulousCount":0,"discussCount":2,"isFabulous":"0","userId":"f68b3c28db3c41d795b34268aef3b68a"},{"id":"a5244d86531f4f969c52184ec2420884","isNewRecord":false,"createDate":"2018-09-28 09:34:52","content":"1024程序猿节","avatarUrl":"head/64121538037382.jpg","nickName":"我叫asd","gender":1,"birthday":"1995-10-02","fabulousCount":0,"discussCount":1,"isFabulous":"0","userId":"asdasdasdas"}],"maxResults":10,"firstResult":0}
     */

    private int code;
    private String msg;
    private ObjectBean object;
    private PageBean page;

    public ObjectBean getObject() {
        return object;
    }

    public void setObject(ObjectBean object) {
        this.object = object;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public PageBean getPage() {
        return page;
    }

    public void setPage(PageBean page) {
        this.page = page;
    }
    public static class ObjectBean implements Parcelable {
        private String id;
        private boolean isNewRecord;
        private String content;//评论内容
        private String avatarUrl;//评论人头像
        // private String nickName;//评论人昵称
        private int gender;//性别  1男2女
        private String birthday;//生日
        private int fabulousCount;//点赞数
        private int discussCount;//二级评论的个数
        private String isFabulous;//自己是否点赞
        // private String userId;//评论人id
        private String createDate;//评论时间
        private String vType; //会员类型

        private String levelUser1;           // 一级评论人id
        private String levelName1;           // 一级用户评论名称
        private String levelUser2;//二级评论人id
        private String levelName2;//二级评论人昵称


        @Override
        public String toString() {
            return "ObjectBean{" +
                    "id='" + id + '\'' +
                    ", isNewRecord=" + isNewRecord +
                    ", content='" + content + '\'' +
                    ", avatarUrl='" + avatarUrl + '\'' +
                    ", gender=" + gender +
                    ", birthday='" + birthday + '\'' +
                    ", fabulousCount=" + fabulousCount +
                    ", discussCount=" + discussCount +
                    ", isFabulous='" + isFabulous + '\'' +
                    ", createDate='" + createDate + '\'' +
                    ", vType='" + vType + '\'' +
                    ", levelUser1='" + levelUser1 + '\'' +
                    ", levelName1='" + levelName1 + '\'' +
                    ", levelUser2='" + levelUser2 + '\'' +
                    ", levelName2='" + levelName2 + '\'' +
                    '}';
        }

        protected ObjectBean(Parcel in) {
            id = in.readString();
            isNewRecord = in.readByte() != 0;
            content = in.readString();
            avatarUrl = in.readString();
            gender = in.readInt();
            birthday = in.readString();
            fabulousCount = in.readInt();
            discussCount = in.readInt();
            isFabulous = in.readString();
            createDate = in.readString();
            vType = in.readString();
            levelUser1 = in.readString();
            levelName1 = in.readString();
            levelUser2 = in.readString();
            levelName2 = in.readString();
        }

        public static final Creator<ObjectBean> CREATOR = new Creator<ObjectBean>() {
            @Override
            public ObjectBean createFromParcel(Parcel in) {
                return new ObjectBean(in);
            }

            @Override
            public ObjectBean[] newArray(int size) {
                return new ObjectBean[size];
            }
        };

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(id);
            dest.writeByte((byte) (isNewRecord ? 1 : 0));
            dest.writeString(content);
            dest.writeString(avatarUrl);
            dest.writeInt(gender);
            dest.writeString(birthday);
            dest.writeInt(fabulousCount);
            dest.writeInt(discussCount);
            dest.writeString(isFabulous);
            dest.writeString(createDate);
            dest.writeString(vType);
            dest.writeString(levelUser1);
            dest.writeString(levelName1);
            dest.writeString(levelUser2);
            dest.writeString(levelName2);
        }
    }
    public static class PageBean {
        /**
         * pageNo : 1
         * pageSize : 10
         * count : 2
         * list : [{"id":"123","isNewRecord":false,"content":"1024程序员节","avatarUrl":"head/64121538037382.jpg","nickName":"😁","gender":2,"birthday":"1998-09-27","fabulousCount":0,"discussCount":2,"isFabulous":"0","userId":"f68b3c28db3c41d795b34268aef3b68a"},{"id":"a5244d86531f4f969c52184ec2420884","isNewRecord":false,"createDate":"2018-09-28 09:34:52","content":"1024程序猿节","avatarUrl":"head/64121538037382.jpg","nickName":"我叫asd","gender":1,"birthday":"1995-10-02","fabulousCount":0,"discussCount":1,"isFabulous":"0","userId":"asdasdasdas"}]
         * maxResults : 10
         * firstResult : 0
         */

        private int pageNo;
        private int pageSize;
        private int count;
        private int maxResults;
        private int firstResult;
        private List<ListBean> list;

        public int getPageNo() {
            return pageNo;
        }

        public void setPageNo(int pageNo) {
            this.pageNo = pageNo;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public int getCount() {
            return count;
        }

        public void setCount(int count) {
            this.count = count;
        }

        public int getMaxResults() {
            return maxResults;
        }

        public void setMaxResults(int maxResults) {
            this.maxResults = maxResults;
        }

        public int getFirstResult() {
            return firstResult;
        }

        public void setFirstResult(int firstResult) {
            this.firstResult = firstResult;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean implements Parcelable {
            /**
             * id : 123
             * isNewRecord : false
             * content : 1024程序员节
             * avatarUrl : head/64121538037382.jpg
             * nickName : 😁
             * gender : 2
             * birthday : 1998-09-27
             * fabulousCount : 0
             * discussCount : 2
             * isFabulous : 0
             * userId : f68b3c28db3c41d795b34268aef3b68a
             * createDate : 2018-09-28 09:34:52
             */

            private String id;
            private boolean isNewRecord;
            private String content;//评论内容
            private String avatarUrl;//评论人头像
            // private String nickName;//评论人昵称
            private int gender;//性别  1男2女
            private String birthday;//生日
            private int fabulousCount;//点赞数
            private int discussCount;//二级评论的个数
            private String isFabulous;//自己是否点赞
            // private String userId;//评论人id
            private String createDate;//评论时间
            private String vType; //会员类型

            private String levelUser1;           // 一级评论人id
           // private String levelName1;           // 一级用户评论名称
            private String levelUser2;//二级评论人id
            private String nickName;  //评论人nikName
           // private String levelName2;//二级评论人昵称


            protected ListBean(Parcel in) {
                id = in.readString();
                isNewRecord = in.readByte() != 0;
                content = in.readString();
                avatarUrl = in.readString();
                gender = in.readInt();
                birthday = in.readString();
                fabulousCount = in.readInt();
                discussCount = in.readInt();
                isFabulous = in.readString();
                createDate = in.readString();
                vType = in.readString();
                levelUser1 = in.readString();
                levelUser2 = in.readString();
                nickName = in.readString();
            }

            public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
                @Override
                public ListBean createFromParcel(Parcel in) {
                    return new ListBean(in);
                }

                @Override
                public ListBean[] newArray(int size) {
                    return new ListBean[size];
                }
            };

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public boolean isNewRecord() {
                return isNewRecord;
            }

            public void setNewRecord(boolean newRecord) {
                isNewRecord = newRecord;
            }

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }

            public String getAvatarUrl() {
                return avatarUrl;
            }

            public void setAvatarUrl(String avatarUrl) {
                this.avatarUrl = avatarUrl;
            }

            public int getGender() {
                return gender;
            }

            public void setGender(int gender) {
                this.gender = gender;
            }

            public String getBirthday() {
                return birthday;
            }

            public void setBirthday(String birthday) {
                this.birthday = birthday;
            }

            public int getFabulousCount() {
                return fabulousCount;
            }

            public void setFabulousCount(int fabulousCount) {
                this.fabulousCount = fabulousCount;
            }

            public int getDiscussCount() {
                return discussCount;
            }

            public void setDiscussCount(int discussCount) {
                this.discussCount = discussCount;
            }

            public String getIsFabulous() {
                return isFabulous;
            }

            public void setIsFabulous(String isFabulous) {
                this.isFabulous = isFabulous;
            }

            public String getCreateDate() {
                return createDate;
            }

            public void setCreateDate(String createDate) {
                this.createDate = createDate;
            }

            public String getvType() {
                return vType;
            }

            public void setvType(String vType) {
                this.vType = vType;
            }

            public String getLevelUser1() {
                return levelUser1;
            }

            public void setLevelUser1(String levelUser1) {
                this.levelUser1 = levelUser1;
            }

            public String getLevelUser2() {
                return levelUser2;
            }

            public void setLevelUser2(String levelUser2) {
                this.levelUser2 = levelUser2;
            }

            public String getNickName() {
                return nickName;
            }

            public void setNickName(String nickName) {
                this.nickName = nickName;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(id);
                dest.writeByte((byte) (isNewRecord ? 1 : 0));
                dest.writeString(content);
                dest.writeString(avatarUrl);
                dest.writeInt(gender);
                dest.writeString(birthday);
                dest.writeInt(fabulousCount);
                dest.writeInt(discussCount);
                dest.writeString(isFabulous);
                dest.writeString(createDate);
                dest.writeString(vType);
                dest.writeString(levelUser1);
                dest.writeString(levelUser2);
                dest.writeString(nickName);
            }

            @Override
            public String toString() {
                return "ListBean{" +
                        "id='" + id + '\'' +
                        ", isNewRecord=" + isNewRecord +
                        ", content='" + content + '\'' +
                        ", avatarUrl='" + avatarUrl + '\'' +
                        ", gender=" + gender +
                        ", birthday='" + birthday + '\'' +
                        ", fabulousCount=" + fabulousCount +
                        ", discussCount=" + discussCount +
                        ", isFabulous='" + isFabulous + '\'' +
                        ", createDate='" + createDate + '\'' +
                        ", vType='" + vType + '\'' +
                        ", levelUser1='" + levelUser1 + '\'' +
                        ", levelUser2='" + levelUser2 + '\'' +
                        ", nickName='" + nickName + '\'' +
                        '}';
            }
        }
    }
}
